load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
    name = "rule_test",
    timeout = "short",
    srcs = [
        "dual_test.go",
        "main_test.go",
        "rule_derive_topn_from_window_test.go",
        "rule_eliminate_empty_selection_test.go",
        "rule_eliminate_projection_test.go",
        "rule_inject_extra_projection_test.go",
        "rule_join_reorder_test.go",
        "rule_outer2inner_test.go",
        "rule_predicate_pushdown_test.go",
        "rule_predicate_simplification_test.go",
    ],
    data = glob(["testdata/**"]),
    flaky = True,
    shard_count = 14,
    deps = [
        "//pkg/config",
        "//pkg/domain",
        "//pkg/expression",
        "//pkg/expression/aggregation",
        "//pkg/expression/exprstatic",
        "//pkg/parser/ast",
        "//pkg/parser/mysql",
        "//pkg/planner/util/coreusage",
        "//pkg/testkit",
        "//pkg/testkit/testdata",
        "//pkg/testkit/testfailpoint",
        "//pkg/testkit/testmain",
        "//pkg/testkit/testsetup",
        "//pkg/types",
        "//pkg/util/mock",
        "@com_github_stretchr_testify//require",
        "@org_uber_go_goleak//:goleak",
    ],
)
